# !/usr/bin/env python
# -*- coding: utf-8 -*-
# @File  : loggConfig.py
# @Author: yaqiwe
# @Date  : 2021/3/23
# @Desc  : 日志文件配置

import logging

import time

thisTime = time.strftime("%Y%m%d", time.localtime())

{'NOTSET':0,'DEBUG':10,'INFO':20,'WARNING':30,'ERROR':40,'CRITICAL':50}

# 日志输出到文件
file_handler = logging.FileHandler('./LOG/' + thisTime + '.log')  # 创建文件处理器
# 使用StreamHandler输出到屏幕
console = logging.StreamHandler()  # 创建日志处理器

logging.basicConfig(handlers=[file_handler,console],
                    level=logging.INFO,
                    format='[%(asctime)s-%(filename)s-%(levelname)s:%(message)s]')
